package com.shangguan.controller;

import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ClassName: PageDispatcherController
 * @Description:
 * @Author: 一尘
 * @Date: 2020 年 03 月 19 20:18
 * @Version 1.0
 */
@Controller
public class PageDispatcherController {
    @RequestMapping("/login")
    public String login(){
        return "login";
    }

    @RequestMapping("/index")
    public String index(){
        return "index";
    }

    @RequestMapping("/unauthorized")
    public String unauthorized(){
        return "unauthorized";
    }
    
     //shiro 的注解 需要什么角色
    @RequiresRoles({"joke"})
    @RequestMapping("/list")
    public String list(){
        System.out.println("----------list-------------------");
        return "list";
    }

    @RequestMapping("/query")
    public String query(){
        System.out.println("----------query-------------------");
        return "query";
    }
}
